from Common import *

from Getter import *
from Setter import *
from Model import *


def launch(host: str, port: int, api_key: str | None = None, api_secret: str | None = None, debug: bool = False):
    """
    启动API服务
    :param host: API服务的主机地址
    :param port: API服务的端口号
    :param api_key: API服务的API Key
    :param api_secret: API服务的API Secret
    :param debug: 是否开启调试模式
    :return:
    """
    app.config['DEBUG'] = debug
    app.config['API_KEY'] = api_key
    app.config['API_SECRET'] = api_secret
    app.run(host=host, port=port)


if __name__ == '__main__':
    launch('0.0.0.0', 5000, debug=True)
